package com.v5ba.client;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class EurekaClientApplication {


    @RequestMapping("/hello")
    public String home(){
        return "hello world";
    }

    @RequestMapping("/hello2")
    public String home2(String name){
        return "name="+name;
    }

    @RequestMapping("/hello3")
    public Menu home3(String name){
        Menu menu = new Menu();
        menu.setId(2l);
        menu.setName(name);
        return menu;
    }

    public static void main(String[] args) {
        SpringApplication.run(EurekaClientApplication.class, args);
    }
}
